<?php

use App\Http\Controllers\Web\AgreementController;
use App\Http\Controllers\Web\ErrorsController;
use Illuminate\Support\Facades\Route;
use Inertia\Inertia;

Route::get('/', function () {
    return Inertia::render('index');
})->name('web');

Route::prefix('web')->name('web.')->group(function () {
    // 服务条款
    Route::get('service-agreement', [AgreementController::class, 'service'])->name('agreement.service');
    Route::get('privacy-agreement', [AgreementController::class, 'privacy'])->name('agreement.privacy');
    Route::get('help-agreement', [AgreementController::class, 'help'])->name('agreement.help');
});
Route::prefix('errors')->name('errors.')->group(function () {
    Route::get('404', [ErrorsController::class, 'error404'])->name('404');
    Route::get('500', [ErrorsController::class, 'serverError'])->name('500');
    Route::get('403', [ErrorsController::class, 'notAuthorized'])->name('403');
    Route::get('401', [ErrorsController::class, 'unauthorized'])->name('401');
});
